package com.minshenglife.zanzan.pub.utils;

import com.nationsky.pub.utils.GsonUtils;


public class Message {
	/**成功状态*/
	public static final String STATE_200="200";
	/**失败状态*/
	public static final String STATE_one="1";
	/**
	 * 返回状态 
	 */
	String state;
	/**
	 * 返回信息
	 */
	String msg;
	/**
	 * 扩展数据
	 */
	Object data;
	/**
	 * 扩展类型
	 */
	Integer type;
	public Message(String state,String msg,Integer type){
		this.type=type;
		this.state=state;
		this.msg=msg;
	}
	public Message(String state,String msg,Object data){
		this.data=data;
		this.state=state;
		this.msg=msg;
	}
	public Message(String state){
		this.state=state;
	}
	public Message(String state,String msg){
		this.state=state;
		this.msg=msg;
	}
	
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}
	public Object getData() {
		return data;
	}
	public void setData(Object data) {
		this.data = data;
	}
	public Integer getType() {
		return type;
	}
	public void setType(Integer type) {
		this.type = type;
	}
	
	public String toString(){
		return GsonUtils.toGson(this);
	}
}
